<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>查询界面</title>
<style type="text/css">
body{
padding: 0;
	margin: 0;
	background: #fff;
font-family: 'Open Sans', sans-serif;
background-color:#DDF3FF;
}
* {
	margin: 0;
	font-family:"Microsoft Yahei";
	color: #666;
}
h1{
	text-align:center;
	text-transform: uppercase;
	 color: #000;
	 letter-spacing: 1px;
	 margin-top:50px;
	}
div.main{
text-align:center;
padding-top:5%;
}
table{
border=1 ;
margin: auto;
width=30%
}
</style>
</head>
<body>
<h1>查询界面</h1>
<div class="main">
<form action="http://localhost:8080/book1/queryservlet" method="post" >
<input type="text" name="query" placeholder="请输入你要查找的用户名" value="${queryname}">
&nbsp;&nbsp;&nbsp;
<input type="submit" value="查询">
</form>
<br>
</div>
<div class="result" style="text-align:center">
<% String query=(String)request.getAttribute("query"); %>
<% String Sid=(String)request.getAttribute("Sid"); %>
<%if(query!=null) {%>
<table border="1" style="margin: auto；" width='30%'>
<tr>
<th>用户名</th>
<th>id</th>
</tr>
<tr>
<td><%= query %></td>
<td><%= Sid %></td>
</tr>
</table>
<% }%>
<% if(query==null){ %>
<% String none=(String)request.getAttribute("none"); %>
<% if(none!=null) {%>
<h2><%= none %></h2>
<% } %>
<% } %>
</div>
</body>
</html>